home *** CD-ROM | disk | FTP | other *** search
/ One Click 14 / OneClick14.iso / Ferramentas / Convert XLS to Pdf / xls2pdf_setup.exe / {app} / lib / pdf2ps < prev    next >
Encoding:
Text File  |  2002-02-22  |  752 b   |  30 lines

  1. #!/bin/sh
  2. # $Id: pdf2ps,v 1.6 2002/02/21 21:49:28 giles Exp $
  3. # Convert PDF to PostScript.
  4.  
  5. OPTIONS=""
  6. while true
  7. do
  8.     case "$1" in
  9.     -?*) OPTIONS="$OPTIONS $1" ;;
  10.     *)  break ;;
  11.     esac
  12.     shift
  13. done
  14.  
  15. if [ $# -eq 2 ] 
  16. then
  17.     outfile=$2
  18. elif [ $# -eq 1 ]
  19. then
  20.     outfile=`basename "$1" \.pdf`.ps
  21. else
  22.     echo "Usage: `basename $0` [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3] input.pdf [output.ps]" 1>&2
  23.     exit 1
  24. fi
  25.  
  26. # Doing an initial 'save' helps keep fonts from being flushed between pages.
  27. # We have to include the options twice because -I only takes effect if it
  28. # appears before other options.
  29. exec gs $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1"
  30.